home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / sound / cheap studio / simpleapp_sound.h < prev   
Encoding:
C/C++ Source or Header  |  2000-09-28  |  3.5 KB  |  98 lines

  1. /*
  2.     File:        SimpleApp_Sound.h
  3.  
  4.     Contains:    Header for SimpleQT functions using SimpleApp framework.
  5.  
  6.     Written by: Mark Cookson    
  7.  
  8.     Copyright:    Copyright © 1996-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 8/13/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 8/27/1999    George Warner    Updated for New (& Improved!) SimpleAppLib.
  21. */
  22.  
  23. #include    <Windows.h>
  24.  
  25. #include    "SAL_Public.h"
  26.  
  27. #include    "DBFF.h"
  28.  
  29. #define    oneBuffer                (1)
  30. #define    tenBuffers                (10)
  31. #define    soundPlaying            (!ASoundIsDone (mySoundInfo) && !paused)
  32. #define    qtStyle                    0
  33. #define    cdStyle                    1
  34. #define kScrollMinValue            1
  35.  
  36. /* Globals */
  37. ControlHandle            playButton1        = nil,
  38.                         playButton2        = nil,
  39.                         playButton3        = nil,
  40.                         playButton4        = nil,
  41.                         playButton5        = nil,
  42.                         playButton6        = nil,
  43.                         playAllButton    = nil,
  44.                         muteCheck1        = nil,
  45.                         muteCheck2        = nil,
  46.                         muteCheck3        = nil,
  47.                         muteCheck4        = nil,
  48.                         muteCheck5        = nil,
  49.                         muteCheck6        = nil,
  50.                         recordButton    = nil;
  51. Boolean                    gDone            = false,
  52.                         sound1Set        = false,
  53.                         sound2Set        = false,
  54.                         sound3Set        = false,
  55.                         sound4Set        = false,
  56.                         sound5Set        = false,
  57.                         sound6Set        = false,
  58.                         sound1Playing    = false,
  59.                         sound2Playing    = false,
  60.                         sound3Playing    = false,
  61.                         sound4Playing    = false,
  62.                         sound5Playing    = false,
  63.                         sound6Playing    = false,
  64.                         playAll            = false,
  65.                         prepairedToRecord = false,
  66.                         recording        = false,
  67.                         karakoe            = false;
  68. SoundInfoPtr            mySoundInfo1    = nil,
  69.                         mySoundInfo2    = nil,
  70.                         mySoundInfo3    = nil,
  71.                         mySoundInfo4    = nil,
  72.                         mySoundInfo5    = nil,
  73.                         mySoundInfo6    = nil;
  74. GrafPtr                    gTheWindow        = nil;
  75. short                    soundsToSync    = 0;
  76.  
  77. /* Function declarations */
  78. #if 0
  79.         short    DoPlay1            (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  80.         short    DoPlay2            (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  81.         short    DoPlay3            (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  82.         short    DoPlay4            (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  83.         short    DoPlay5            (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  84.         short    DoPlay6            (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  85.         short    DoPlayAll        (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  86.         OSErr    MuteSound1        (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  87.         OSErr    MuteSound2        (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  88.         OSErr    MuteSound3        (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  89.         OSErr    MuteSound4        (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  90.         OSErr    MuteSound5        (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  91.         OSErr    MuteSound6        (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  92.         short    DoRecord        (const ButtonItemRef pButtonItemRef,const SInt32 pModifiers);
  93.         pascal    OSErr    ClearAllSounds    (long menuResult);
  94.         void    MyIdleProc        (EventRecord *evt);
  95.         void    main            (void);
  96.         void    EnableControl    (ControlRef cr);
  97.         void     DisableControl    (ControlRef cr);
  98. #endif 0